Got output of page 538. changed the alerts to console.log even though the solution uses alerts.