smarter editor, fixes #6