Vertical and horizontal nanowires