More flexible api