use a hash map for materials