refactor arcball