refactored code, fixed bug when clicking from user show page
fixed merge conflicts