fixed some error and add model