changed to builder pattern