Added add node dependency function