always pass the type as a parameter