modifed initialize method