Added initialize method and simplified initialization