refactor set percentage on badge + also in keyup event