first test of the controller
refactoring
clean pairs everytime they are calculated