refactored code and executable for extraction script added