added some more checks