Distribution of logic between the functions.