added argument to specify position in stream via fseek