bringing the methods in a logical order so it is easier to understand [ci skip]