updated for new endpoint def