added the if check