remove consolewrite function