working on calculate