Updated to use endpoint