Refactor varity to be the wrap function