removing pointless if.nils