commenting code, introducing global variables