add draw function. Fix boundary problem.