add controller code