input verification for new constructor