AESH-253

improvements

comment removed

assert and baos.reset added