add test-code directory
fix ortho function