XPS and XRD study of the electrochromic mechanism of WOx films