added errormessage and message