added conditionals, ternaries and comments