moved init code to setup

for issue #747