fixes and tested with 100K