add create_parent function