replaced sscanf() with strtol() and strtod()