improving editor behaviour