using int rather than uint32 for cycle counting
.