cleaned up error messaging