changed method for accessing Entity's input stream