deal with messy codes