created mechanism of add and edit words