Implementing the init method