make devHandle global, simplify the interface