changed to log instead of alert