added comments to try and understand the level.js