register tick handler