refactor tick