added the infrastructure for detecting and modifying instructions for prisoned methods