use Map interface instead of implementation