refactoring percentage fix