Implemented PrintString function