starting to re factor, consolemode in main