added total and refine