change endpoints from interface to class