support programmatic initialization