part way through refactor - still not working