Logic works, now to parse out endlines