modfied for model change