export some functions in mix.R