started adding code to make it work not tested not complete
added code to check for a blank line