change variable names, added comments