minor refactoring/maintenance