organize codes to a parent controller