remove some messy code