fix getFriends for current API + fix code to work properly + improve readability