hlim10 kchen26 : clean up the codes