endpoints is an array