change InstructionPtr from iterator to real pointer