added calculations and console.log - ready for testing