Adding another constructor so that upon initialization the object can be valid