optimized syncing and added --setup option