cpdef instead of cdef (fix for part of #1)