Added searchEmptySlot() method