before cleaning code