moved state management to tick instead of being split between tick and ping