added ternary that has been checked

check ternary and added inputs as well as final touches