added invariants for quickChecking (!!)