added solutions on streams and local state