add extract code to get model