remove unnecessory codes