Implemented a constructor for the class