created functions for error messages