remove some unused code remaining will be removed later