added some verifications