Fixing out of memory error by adding 500 stories at a time