updated messages module to return promise for msg groups