introduce builder pattern to simplify testing