simplify API with reflection