even more error checking