add lastsyncdate and func