update.cpp - clean up