Changed method signature to Map instead of HashMap