basic model editor code