Updated within function not to have a mandatory "then" statement