c++11?
use dir local var instead
delete trailing spaces