adjust percentage calculation to fit df behavior