move some private and public methods at their proper location in the file