update & cleanup