cleanup some codes