started working on calculation