some ideas for solving friends problem