Add extract to func