improve class scan