use respond_to and respond_with