finished ordering function