implemented logic to attach a method using use