These functions will be used in console.c