overhauled map reader to support weights