Moved yes/no questions into a function