refactoring to functions, tags instead of getsimilar