elems + mods implemetation and tests