refactored GetUserMessages method