Overloaded the constructor.