Simplify formulation and change from print() to assert()