fix update, implent more tests