cleaned up inspection routine