updated init method