use stringstream in place of strtoul