CHANGED:clean up the code