new code for decvices