This seems to be a better implementation of the hybrid velocity counter