added message handling to simulator