Almost got device selection working