added some error tests to find out what exactly is going wrong