add variable vertex, flight direction, debug energy tracking code