cleaned up update.c