updated license to mit, also switched interface to use callback instead of stream