replaced typeof with decltype