move some to lib