modify model and add loading function