dynamic list of devices in the template, closes #3