First working version that declares devices