refactor broken ternary
new build with bugfix