fixed writeln()