refactoring calendar back and front + refactoring match front