corrected wrong calculations