implemented some bad input checks and also user prompts