removed unnecessary code
added notes