A new method to distinguish hadronically decaying boosted Z bosons from W bosons using the ATLAS detector