added function that cut string