More flexible API to generate result.