replaced an if statement with ternary
resolved merge conflicts