added profile updating and message queue management