updated for atmega