implemented grid level locking