Second part of program

Add smooth function and funtion for selection of different parts of input
stream