Modified constructor