implement calculation of similarity histogram, change keywords_for_pictures data structure according to comment