added function getNumFromString(string)