worked on sum, almost working