minimalist transform stream implementation