can pass endpoint as option