minor refactoring--still planning