   end
 
   def get_data(path) do
-    api_movies = get_api_movies(path)
     database_movies = get_database_movies
-
-    database_movies || []
+    movies = if (length(database_movies) < 1) do
+       get_api_movies(path) || []
+    else
+      database_movies
+    end
   end
 end

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

  def get_database_movies do

  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"
