move initialization to engine from railtie