adding to code to take into account mistakes users can make with input
etc