handles all attribute changes