function read devices