added comments and changed names