implements automatic generic