Added code and notes