calculation of three stage gear