Remove the use of stringtoobject method