Fixed some things and added a ternary to alert the answer as well