format code in controller file