created var
created if
created else if
created else
added comments
created var
created other var
created ternary
added comments
created var