implemented printStream