added stream as an alternative to curl