Fix: typo
Using template for more readable code