finished init code