spot_early code