added an isEmpty check