moved the 8puzzle code into test code