changes in the scope, added the syntax "then"