added postmsg support