make test creation a function too