added id to models api and updated controller