code tweaks and handout