resolve: run functions before controller instantiates