cleanup some code