small refactor for imports and functions