rewrite Phase III: AJAX friendship