remove unused code & eliminate warning