first cut of test-is-finished function
test-is-finished diagonal bug fixed