add test middle fn