decompose contact init code into contact object