Code for 2.6

Works with 2.6 conversion