added generic empty non empty support