[feature] change static variables into macro