arrange depth order