performance improve with cython