Add utility function for handling percentage value