move the initialization code into the constructor just below the existing if statement