updated getPeripheral to allow multiple peripherals