More work with main function