mini-refactor of feed.js for DRY