making everything into working constituent functions