Cython implementation of Sandbox