refactor configuration. more to come