optimize base controller