extract to model
Merge pull request #36 from quipper/extract

extract to model