bit of input checking