added bucketization of messages