Expanded upon controlfunctions