Code working: tested, produced accurate results