added appendln() for automatically adding linefeed