public functions handle bad input
unit test handling bad input