adds functions for calculating percent remaining