the function add text and change duration