string functions were used in unit tetss only, and were replaceable with io_lib:format
Try and make this code a little bit more organised andd easier to follow