converted to console application