minor improvements and synchronization