added end of stream and tests for commit