changed method for accessing Entity's output stream