this api needs both result type and parameters