separated init code from utils to reduce static library size