refactor - reduces code size