fixing init method