added bogus input handling