thanks @ahmetaygun for console implementation