splitting problems into different files and moving shared logic to a module