replaced int with decltype