move some methods around for clarity