added order drawing function
added some funcs