finished all of the insert and update functions on models