added wire length calc