added sync support, fixed some parameters