began on extraction code