better main structure