Changes to look at previous sibling and parent