removed unneccessary if