now using endpoints