move variable declaration for stream read function
Update methods now work asynchronously