problem was scalar context propogating to the wrong place in the grep