slight refactoring.
fix things up.