added avr code