added custom api routes, added index and show actions that render json only