console log in loop