Passing custom types at instantiation