update string to int method