use alert instead of console log