editor function added