changed calcpercentage, it now takes