r20083: move function together which belong to each other