create editor model separate function