restructure model and detail.