updating variable name from stream to s_type and adding addn. func.