moved console.log to inside init