looks like $read is some of the problem as it can only return single lines if I understand correctly.My mate said something about he was going to look into regex with %var but like I said we are far from experts on any of this. The above works for the most part so thanks for trying to help guys
