work in progress on calculaltions