corrected/tested stream searching