implement editor function