added synchronization and comment. final commit, submitting now.