fixed bug with having two parents, to become untree like i.e graph based