Working version. Modes based on positive and negative weeks. Only Mode A implemented