Adding simple error checking and ui input