fixing missing export: main function