removed ternary operator check (was not needed)