edit and add new type