more refactoring
fix saturation calculation