added tick handler