debugged missing brace in map code