custom editor refactored