implemented the feed api with the algorithm