wrote calculateSidecut method