add method for getting messages before a specified date