finally we have controlled memory usage