add minimum when fetching messages from DB