Slight simplification of logic