remove some unnecessary parts of code