added some more error functionality