some notes and code to reuse