friend identification implemented and some fixes