added automatic device parsing