move percentage function to gif class