removing surplus modules