moving some logic to tesla adapter