working on calculation method