refactored editelement/genelement