compile failed move all func to main func