refactoring to use viewsets