refactor InsPr variable