added api for device