first structure logic