refactor configuration