Refactoring compensate functions