changed function to check attributes to be sync