Implemented Grid and multiThreading