Reduce the code of carousel

changes in user controller