adjust ptr order