changed alert to console