refacto and add tz config