started adding code to access db and compute topic similarities