MOD move some function to here