Implemented the constructor