refactor feeds script