is it okay to put the static injection call inside this if? not sure