fixed calculations and corrected text in console log