refactor the Inflater checking