strip multi dispatch code, refactor, move to different package