refactored: use hashmaps for gettings shapes and classes