Both share a number of similarities in terms of structure (i.e., hodology) and function. With regard to structure, both have projections to and back from the premotor cortex via the thalamus, and both function together to process information from the association cortex in the service of organizing and executing movements (see figure below). The differences include the fact that while the basal ganglia receive inputs from the whole of the cerebral cortex, the cerebellum has no direct inputs. Moreover, outputs from the cerebellum go to the premotor and motor cortices, with the basal ganglia projecting to the frontal cortex as well. While both structures work in combination functionally, they have been accorded different roles in the control of movement: the basal ganglia are thought to participate in the preparatory control of movements and with the generation of ramp movements, while the cerebellum directly regulates movements into a unitary action through taking account feedback from the periphery (e.g., muscle spindles), and by means of error correction of motor cortex via a negative feedback loop involving the spinocerebellum. Finally, there is increasing evidence that both structures are implicated in non-motor functions.