writing root page