added add_device DB routine