search code fixed, string to integer