reverting some wrong calculations