added 'sync' option, fixed up documentation