first version code, fetch and model