fixing up and adding timing
compatability with both pypy and cpython