low-level initialization functions
still not tested