added some comments to try and understand the level.js