added in functions for error checking
input error checking class added