fix feed and make unit test for feed logic