Added compare method to scope handler