Commented and added security test for user input