here is the iimplamentation of the sting libary and memory menagement needs to be moved to the propper place