updated extraction.m to meet halfway with the python scripts