Adding device code to index