updated functions
update modle design