Added device_read function implementation