Update: cleaned the codes