else statement added with consolelog