api refinements and factorization