added onInitialize method