the previous code simply used internal elements of the testapi which wasnt strictly speaking public api