use floats for percent calculation

pull request for issue #1. Use floats for percentage calculation.