redefine initialize method with ternary operator