simplify code & add editable definition