did some of the update functions and added tests