Making the method work properly