Added genModel