modified the way to pass generic type argument