I suggest to replace this ```if/else``` by template function with a body of ```if/else```