modify some classes to use steram api internally .