moved calculateComponentScore functionality to token class