added cleaner code for synchronize method in Pad