added error_msg class to p