Updated initialize method.