map array refactored for DRY
some read method improved