removed unnecessary ternary operator