move some stuff
move main
use a queue