move the configurate logic into a util class