altering logic of dwh_stream_f for convenience