split core functionality into a module
split core functionality into a separate module