update JSDoc
remove unnecessary variable
rename variables