added code for parent, children and first methods