removed all unneccessary undefined checkups