refactoring base stuff a bit