changed the latest offers repository function