reflection added to handle the generic arg.