Updated logic in initialization method