adds func to reset to head