update head space