add function to set value by percent