modified variable names, removed comments