switched code to use remote sesame endpoint