add generic for emptymap