calculations, I hope my methods are correct