minor changes and sync function