handle block scopes