refactored method
improve editor