Modify controller code