Fork from http://code.google.com/p/hsync/