better way of getting lines... without \n at the end