fix recurtion; add direction start,end;good job