updated for hardware revision 4