replaced atoi with strtol according to http://carolina.mff.cuni.cz/~trmac/blog/2005/strtol-usage-guide/
replaced atoi with strtol according to http://carolina.mff.cuni.cz/~trmac/blog/2005/strtol-usage-guide/

niclashoyer/wkill