reduce to one model and wrote code to construct url for api endpoint