Modified for hidden region/group calculation