added notes, remoted some code snippets