console and gui mode implemented