for console applications