formatting code in User controller