refactor model, make pairs variables 3-dimentional, refactor week stability constraints