type traits to the rescue