fixing bug with extracting string and converting to float