changed the solving algorithm so that another method finds empty cell