bug fixed and simple tested.