working on element.cpp