added comments & some scripting