added some text about hoisting and moved code block