just noticed an error, using atoi instead of _ttoi