a few refactors...