refactor configure function parameters into one object