Added code for peripherals