changed message allocation strategy
changed context httpagent