added the missing create_headnode