Modified constructor logic. Overloaded custructor.