prototype function for getting cells from a line