using struct for endpoing configuration