clarifying program logic