adding reservoir sampling