prepared code for doing payments on ticks