made checking scopes generalized so looks in all class scopes