redid how scope changes were detected. can now detect modifications