extra check on input validity