CHANGED:polish the code