updated scripts to check user input