updated endpoint creation section