minor changes, additional refactoring needed
squash this commit