support generic in methods