delete if after else in test injectiondate