rig data refactoring a bit