Cortical and subcortical mechanisms at the core of imitation