being at the equilibrium is the reason for the existence of an electrical gradient, for they represent a net displacement of charges across the membrane, which are unable to immediately re-enter the cell to restore the electrical equilibrium. Therefore, their slow re-entrance in the cell needs to be counterbalanced or the cell would slowly lose its membrane potential. The second purpose, intrically linked to the first, is to keep the intracellular concentration more or less constant, and in this case to reestablish the original chemical gradients, that is to force the sodium and calcium which previously flowed into the cell out of it, and the potassium which previously flowed out of the cell back into it (though as the potassium is mostly at the electrochemical equilibrium, its chemical gradient will naturally reequilibrate itself opposite to the electrical gradient, without the need for an active transport mechanism). For example, the sodium (Na+) and potassium (K+) ions are maintained by the sodium-potassium pump which uses energy (in the form of adenosine triphosphate (ATP)) to move three Na+ out of the cell and two K+ into the cell. Another example is the sodium-calcium exchanger which removes one Ca2+ from the cell for three Na+ into the cell. During this phase the membrane is most permeable to K+, which can travel into or out of cell through leak channels, including the inwardly rectifying potassium channel. Therefore, the resting membrane potential is mostly equal to K+ equilibrium potential and can be calculated using the Goldman-Hodgkin-Katz voltage equation. However, pacemaker cells are never at rest. In these cells, phase 4 is also known as the pacemaker potential. During this phase, the membrane potential slowly becomes more positive, until it reaches a set value (around -40 mV; known as the threshold potential) or until it is depolarized by another action potential, coming from a neighboring cell. The pacemaker potential is thought to be due to a group of channels, referred to as HCN channels (Hyperpolarization-activated cyclic nucleotide-gated). These channels open at very negative voltages (i.e. immediately after phase 3 of the previous action potential; see below) and allow the passage of both K+ and Na+ into the cell. Due to their unusual property of being activated by very negative membrane potentials, the movement of ions through the HCN channels is referred to as the funny current (see below). Another hypothesis regarding the pacemaker potential is the 'calcium