improve implementation of ticker to avoid the static counter