clean mamager code