refactoring - friends isnt working