The substring() thing doesn't look correct.