move some stuff and rewrite
move some stuff and rewrite