remove redundant controller code