add notes and code