code formatting
Fixed the flickring issue + a stress test