add cast and comp, DRY up update.sh