added controlResult and some comments