refactor: mv all helper functions to utils module