makeorder and test encoding