device model
add device function