remove dependance on dynamic value and on c++11