add generic type to compare value