bad state .. implementing var scopes