mostly working except for level order