created function calcStings