further refactoring
refactor set two variables in a ternary conditional
final refactor of andy_inject using each method