handles multiple users with incorrect number of lines
added more functionality to the script