add defense code for getlatest