changing ternary if to 'get(,)'