moved tick to properly count frames