friends in need refactor