optimize: rm unused code