refactoring social networks routes