add ternary operator with printouts, alerts and notes for function