put the main func into another files