remove unused code, add reset by selector