Added the init method into the constructor