changing return to alert - js