added message parsing
added procedure