more changes/refactoring