functionality for add text completed