first draft of a input stream wrapper