added notes and completed coding