added messagetype option