changed removed old records task to a class method for delayed job to handle