Implemented the data auto-extraction part, commented test code