factored out utils in separate package