reimplementation of writing framework to work with multiple tables using measurement tags - WIP