Proper placement of logic