This should be correct template implementation