remove unused code
sync with officer version