refactor of sizes & shapes using hash maps