Working better, but calculation is still wrong