made better main example