made some error message generation