Use method call instead of accessing map with string key