bit of refractoring, moving info to config