Changed the percent fuction to work, now uses floats.