Implemented input verification.