reorganize the code so that it no longer includes a C extension