Work in progress

fixing calculations