changed the way to retrieve procedure self