moved init code into app controller