Updated console.log to print result for testing.