added empty map guard