Implemented basic functionality of "extract" pass