adding edge case handling for user inputs