Correcting what function goes in what condition