fix according to comments (ternary operator was implemented)