clean for re-write code