recovering attorney fees before a trial