added sync into commandparser class

todo: add in sync at db level in method