adding functions to convert string to numbers and vice versa