implemented class with generic