change the method order to match the flow better