notes and draft code