added stream and join sampling