testCode has not been throoughly tested yet