partially fixed friend add bug (key length test still broken)