minor refactor -dry