Add total and close partial implementation