slightly modified string method. Works now I think.