add some external bitInputStream code to be used later