removed unecessary if