move cox constructor into globals