more work on editor
added gates