When may immunity be acquired