added alternative for the input function which also includes a boolean return(as ref) to inidcate any error conditions