clean bounds code