Added logic for Google sync