commit builder pattern with generic