same as pre and inoder