code on tues eve before big refactor