minor refactor for ios