refactor to ready for arm.