Alginment conversion script by Austin Matthews