added new function for finding similar documents