 
     transformed_results = api_results["results"]
     |> Enum.map(fn(movie) -> Enum.reduce(movie, %{}, &transform_api_results/2) end)
+    
+    transformed_results
     |> Enum.each&insert_movie/1
+
+    transformed_results
   end
 
   def get_database_movies do

  end

  def insert_movie(movie) do
    #this should probably be a model thing?
    atomized_movie = Enum.reduce(movie, %{}, fn({key, val}, acc) -> Map.put(acc, String.to_atom(key), val) end)
    query = SimilarfilmsPhoenix.Movie
    |> SimilarfilmsPhoenix.Repo.get_by(movie_id: atomized_movie[:movie_id])

    if is_nil(query) do
      m = %SimilarfilmsPhoenix.Movie{}
      |> Map.merge(atomized_movie)
      |> SimilarfilmsPhoenix.Repo.insert
    end

  end

  def get_api_movies(path) do
    #check for updates here first - don't fetch if unnecessary
    HTTPotion.start
    api = Application.get_env(:similarfilms_phoenix, SimilarfilmsPhoenix.ApiKey)[:moviedb_api_key]
    host = "api.themoviedb.org"
