made endpoints optional