use format stream to read, need to make sure stream is matching input datatype