Implemented the TBB functions for fill & generate