update code for console