better primitive management (not tested)