add device CRUD function