Attorneys generally charge their clients in one of three ways: (1) an agreed hourly rate, times the number of hours the attorney spends on the matter; (2) a contingent fee, in which the attorney receives a percentage of the amount recovered or received by the client in the matter; or (3) a fixed-fee in which the attorney charges an agreed amount (often with some or all of the fee paid before work begins). If the attorney is charging on an hourly basis, he may require a fee deposit (sometimes called a retainer) to secure payment of the hourly fees. The client may be required to replenish this fee deposit. The attorney must hold the unearned fee deposit in her trust account until she does the work and is entitled to some or all of the payment. If there is a fee dispute between the attorney and client, and the attorney and client are unable to resolve the dispute, many state bar associations offer optional (and sometimes mandatory) fee dispute resolution procedures.