implemented and added new basic algorithm

- get average from stream