init function finalised