new map parser, fixes #40