added main for console implementation